package demo1;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-04-23
 * Time: 15:54
 */
public class TestDemo1 {

    public static void main(String[] args){
        List list = new ArrayList();
        list.add("1");
        list.add(1);
        int i = (int)list.get(0); // java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
        int j = (int)list.get(1);
    }
}
